#ifndef FILENAME_HPP
#define FILENAME_HPP

#include "wx/wxprec.h"	//precompiled things

#ifndef WX_PRECOMP		//in case no precompiled things
	#include "wx/wx.h"
#endif //WX_PRECOMP

#include <string>
#include <sstream>

#ifndef EXTENSION_MAX
#define EXTENSION_MAX 99 //magic number, should fix this some time
#endif //EXTENSION_MAX

class Filename
{
private:
	std::string fn_cpp;		//original string, avoid wxString conversion to c_str
	wxString fn_original;	//original string
	wxString fn_core;		//"core" filename, lowercase, w/o -glow.dds, -normal.png etc.

public:
	Filename(){}
	Filename(std::string cpp_ext_in);	//construct from C++-string
	Filename(wxString wx_ext_in);		//construct from wxWidgets string

	wxString getOrig () const {return fn_original;}
	wxString getLower() const {return fn_original.Lower();}
	wxString getCore ()	const {return fn_core;}
	wxString getComp () const ;

	std::string getCpp() const {return fn_cpp;}

	//suppose these could be static too
	wxString trimName (wxString wx_ext_in) const;	//turn full into 'core' filename
	wxString paddedInt (int in) const;				//turn integer into 4-digit zero-padded string, e.g. 0034
	static wxString trimString (wxString TrimThis); //trim leading, trailing spaces
	static std::string trimString (std::string TrimThis); //trim leading, trailing spaces
};

#endif //FILENAME_HPP